/*
* @Author: Choisaaaa
* @Date: 2018/5/22  22:45
*/

var _mm = require("util/mm.js");

var _order= {
    //1.店家查看接收的订单列表
    getSellerOrderList : function(listParam,resolve, reject){
        _mm.request({
            url     : _mm.getServerUrl('/seller/order/list.do'),
            success : resolve,
            method :"post",
            data : listParam,
            error   : reject
        });
    },
    //2.店家获取订单详情
    getSellerOrderDetail : function (paramInfo,resolve, reject) {
        _mm.request({
            url     : _mm.getServerUrl('/seller/order/detail.do'),
            data : paramInfo,
            method :"post",
            success : resolve,
            error   : reject
        });
    },
    //3.店家发货
    getSellerSendGoods : function (id,resolve, reject) {
        _mm.request({
            url     : _mm.getServerUrl('/seller/order/send_goods.do'),
            data : {
                orderNO  : id
            },
            success : resolve,
            method :"post",
            error   : reject
        });
    },
    //3.店家搜索
    sellerSearchOrder: function (orderNo,resolve, reject) {
        _mm.request({
            url     : _mm.getServerUrl('/seller/order/search.do'),
            data : {
                orderNo  : orderNo
            },
            success : resolve,
            method :"post",
            error   : reject
        });
    },

    //3.店家搜索已经付款的订单
    sellerSearchOrder: function (listParam,resolve, reject) {
        _mm.request({
            url     : _mm.getServerUrl('/seller/order/searchPayed.do'),
            data : listParam,
            success : resolve,
            method :"post",
            error   : reject
        });
    },
}

module.exports = _order;